package router

import (
	."demo/app/http/controllers"
	"demo/app/http/middleware"
	"github.com/gin-gonic/gin"
)

func Register(router *gin.Engine)  {

	article := router.Group("/article", middleware.BeforeRequest, middleware.AfterRequest)
	{
		article.GET("/:id", ArticleController.GetDetail)
		article.GET("/", ArticleController.GetList)
		article.POST("/create", ArticleController.Create)
		article.POST("/update/:id", ArticleController.Update)
		article.POST("/delete/:id", ArticleController.Delete)
	}
}